package org.lanyu.springainovel.common.service;

import org.lanyu.springainovel.common.dto.StreamGenerationRequest;
import reactor.core.publisher.Flux;

/**
 * 通用流式生成服务接口
 */
public interface StreamGenerationService {
    
    /**
     * 生成流式响应
     * 
     * @param request 流式生成请求
     * @return 流式响应
     */
    Flux<String> generateStreamResponse(StreamGenerationRequest request);
    
    /**
     * 终止流式输出
     * 
     * @param abortSignal 终止信号
     * @return 终止结果
     */
    boolean abortStreamGeneration(String abortSignal);
}